FxCop |
FxCop |
Runs FxCop analysis tool to improve code quality.
FxCop 10.0 has to be downloaded and installed separately and can be retrieved from here:
http://www.microsoft.com/en-us/download/details.aspx?id=6544.
The Installer can be found in the Microsoft Windows SDK for Windows 7 or later.
In order to retrieve the installer without installing the whole SDK please refer to the article How to retrieve and install FxCop 10.0? in the SPCAF Knowledgebase.
If FxCop is installed SPCAF uses the command line tool FxCopCmd.exe which is available in the FxCop installation directory. All assemblies of WSP packages are then analyzed with FxCop and the results are integrated into the SPCAF reports.
The integration of FxCop into SPCAF can be adjusted by several configuration parameters. The parameters allow changing for instance the path to FxCop or the applied FxCop ruleset. For a list of all configurable parameters refer to the SPCAF rule which integrates FxCop.
FxCop only works if all referenced assemblies are available. Therefore SPCAF provides automatically a list of directories to FxCop in which referenced assemblies could be found.
However, FxCop often requires special SharePoint assemblies to analyze assemblies with references to SharePoint assemblies.
A typical error message in case of missing assemblies is:
Rule | Description | Type | Severity |
---|---|---|---|
FXC350201: Assembly should not contain problems which are detected with Microsoft FxCop | The assembly will be checked with Microsoft FxCop for potential problems (if the tool is installed). | AssemblyFileReference | Error |
Copyright © 2013 RENCORE AB. All Rights Reserved
Disclaimer: The views and opinions expressed in this documentation and in SPCAF are those of the creators and do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. All trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners. SharePoint Code Analysis Framework, Version 4.5.2.7855, see www.spcaf.com for more information |